* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
}

.container {
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
    transition: transform 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    position: relative;
}

h1::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #3498db;
    margin: 10px auto;
    border-radius: 2px;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #34495e;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

input:invalid {
    border-color: #e74c3c;
}

.result {
    margin-top: 1.5rem;
    padding: 1.2rem;
    border-radius: 8px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.result.show {
    opacity: 1;
    transform: translateY(0);
}

.bmi-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.bmi-category {
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    display: none;
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .bmi-value {
        font-size: 1.5rem;
    }
    
    .bmi-category {
        font-size: 1rem;
    }
} 